<html>
<head><meta charset="utf-8"><title>get rid of error codes · t-compiler/wg-diagnostics · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/index.html">t-compiler/wg-diagnostics</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html">get rid of error codes</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="186994414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186994414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186994414">(Jan 30 2020 at 14:59)</a>:</h4>
<p>Hi <span class="user-group-mention" data-user-group-id="1187">@WG-diagnostics</span> <span class="user-mention" data-user-id="210316">@GuillaumeGomez</span> . Let's talk about replacing numeric error codes with string names. This happens in <a href="https://github.com/rust-lang/rust/issues/67086" target="_blank" title="https://github.com/rust-lang/rust/issues/67086">#67086</a>. Please pick a time at  <a href="https://terminplaner4.dfn.de/KlpwSW4AuBoCofUS" target="_blank" title="https://terminplaner4.dfn.de/KlpwSW4AuBoCofUS">https://terminplaner4.dfn.de/KlpwSW4AuBoCofUS</a> I'll leave a more detailed explanation of the things to discuss below</p>



<a name="186995079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186995079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186995079">(Jan 30 2020 at 15:05)</a>:</h4>
<p>Done! Also: it's very likely I won't be around on zulip so don't hesitate to ping me on discord.</p>



<a name="186996027"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996027" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996027">(Jan 30 2020 at 15:14)</a>:</h4>
<ol>
<li>Do we want to expose names instead of numbers to users? That can also be done by just creating an id-&gt;name map that is used before printing the error.</li>
<li>I had the feeling everyone is d'accord with nixing numeric codes and using (edit: removed "nice".  Sorry, I didn't mean to immediately add a judgement about opinions here) string names just like we have lint names. <a href="https://github.com/rust-lang/rust/pull/67086#issuecomment-562571752" target="_blank" title="https://github.com/rust-lang/rust/pull/67086#issuecomment-562571752">This feeling is obviously wrong</a>. So let's talk about the points here. <span class="user-mention" data-user-id="116122">@simulacrum</span> mentioned it being hard to grep/tidy for. Maybe something like <code>error_id!(some_name)</code> would alleviate this concern?</li>
<li>Should we check that an error name is only used once? Apparently we don't have this check anymore since quite some time and haven't had a problem with it. Does anyone think we should reintroduce such a check?</li>
</ol>



<a name="186996146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996146">(Jan 30 2020 at 15:15)</a>:</h4>
<p>no, no, I'm totally on board with nice names</p>



<a name="186996232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996232">(Jan 30 2020 at 15:16)</a>:</h4>
<p>I am opposed to <code>"E0303"</code> vs. <code>E0303</code> where the first is actually restricted to that tight format</p>



<a name="186996265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996265">(Jan 30 2020 at 15:16)</a>:</h4>
<p>right, but we need some intermediate step before moving to full names</p>



<a name="186996274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996274">(Jan 30 2020 at 15:16)</a>:</h4>
<p>otherwise we'll never get it merged</p>



<a name="186996345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996345">(Jan 30 2020 at 15:17)</a>:</h4>
<p>if we did <code>error_id!(E0303)</code> this would still work as the macro could take an <code>ident</code> fragment</p>



<a name="186996364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996364">(Jan 30 2020 at 15:17)</a>:</h4>
<p>yes, I think <code>error_id!</code> macro is a good idea</p>



<a name="186996378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996378">(Jan 30 2020 at 15:17)</a>:</h4>
<p>(makes the lint checking easier too)</p>



<a name="186996496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996496">(Jan 30 2020 at 15:18)</a>:</h4>
<p>I am fine with moving to "E0303" as an intermediate step (to be "quickly" replaced)</p>



<a name="186996532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996532">(Jan 30 2020 at 15:18)</a>:</h4>
<p>so basically all the use sites at macro call sites that were changed from <code>E0303</code> could in fact stay as they are and internally call <code>error_id!</code> on the value, and all the non-macro call sites could just use <code>error_id!</code>.</p>



<a name="186996572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996572">(Jan 30 2020 at 15:19)</a>:</h4>
<p>yep, and (in theory) we can also make the macro accept either</p>



<a name="186996598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996598">(Jan 30 2020 at 15:19)</a>:</h4>
<p>i.e. internally we map <code>this_is_a_nice_name</code> to E0303 for now</p>



<a name="186996609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996609">(Jan 30 2020 at 15:19)</a>:</h4>
<p>oh</p>



<a name="186996616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996616">(Jan 30 2020 at 15:19)</a>:</h4>
<p>hmm, interesting</p>



<a name="186996621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996621">(Jan 30 2020 at 15:19)</a>:</h4>
<p>(or vice versa)</p>



<a name="186996695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996695">(Jan 30 2020 at 15:20)</a>:</h4>
<p>or, as another straw man, we make the macro accept symbols (i.e., <code>sym::</code></p>



<a name="186996712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996712">(Jan 30 2020 at 15:20)</a>:</h4>
<p>and then intern the current ids</p>



<a name="186996718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996718">(Jan 30 2020 at 15:20)</a>:</h4>
<p>hehe</p>



<a name="186996722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996722">(Jan 30 2020 at 15:20)</a>:</h4>
<p>nice</p>



<a name="186996746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996746">(Jan 30 2020 at 15:20)</a>:</h4>
<p>that way it's all the same type and so forth and super easy to migrate to any string</p>



<a name="186996754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996754">(Jan 30 2020 at 15:21)</a>:</h4>
<p>ah not sure if we have symbols available in <code>librustc_error</code></p>



<a name="186996912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996912">(Jan 30 2020 at 15:22)</a>:</h4>
<p>yea doesn't look like it</p>



<a name="186996941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996941">(Jan 30 2020 at 15:22)</a>:</h4>
<p>sure we do?</p>



<a name="186996958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996958">(Jan 30 2020 at 15:23)</a>:</h4>
<p>depends on librustc_span</p>



<a name="186996985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186996985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186996985">(Jan 30 2020 at 15:23)</a>:</h4>
<p>which has sym (used to by syntax_pos)</p>



<a name="186997019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/186997019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#186997019">(Jan 30 2020 at 15:23)</a>:</h4>
<p>ah so it does</p>



<a name="187005675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187005675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187005675">(Jan 30 2020 at 16:47)</a>:</h4>
<p>Do we have a proposal on the format for the new codes?</p>



<a name="187005796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187005796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187005796">(Jan 30 2020 at 16:48)</a>:</h4>
<p>nope, I would have assumed "like lints"</p>



<a name="187005990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187005990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187005990">(Jan 30 2020 at 16:50)</a>:</h4>
<p>My main concerns are that by having a string code that might prove suboptimal we can't really change it afterwards, that the output will be less consistent (ie where do I look for the start of the message) that there's duplication between the message and the code. I feel that it'd be a bigger benefit to try and get --teach working everywhere than try and improve the "error code as non-semantic pointer to docs" problem</p>



<a name="187006009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187006009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187006009">(Jan 30 2020 at 16:50)</a>:</h4>
<p>But I acknowledge that none of these are big issues</p>



<a name="187006023"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187006023" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187006023">(Jan 30 2020 at 16:50)</a>:</h4>
<p>We might have problems dealing with I line docs for a while though</p>



<a name="187006059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187006059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187006059">(Jan 30 2020 at 16:51)</a>:</h4>
<p>I feel no general pressure to do these changes <em>now</em> rather than later, so if you think there's some benefit to delaying, let's do that</p>



<a name="187039071"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039071" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039071">(Jan 30 2020 at 22:38)</a>:</h4>
<p>I don't think <code>sym::the_code</code> is a good idea</p>



<a name="187039089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039089">(Jan 30 2020 at 22:38)</a>:</h4>
<p>It forces recompilation of <code>rustc_span</code> if you want to add a new error code</p>



<a name="187039095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039095">(Jan 30 2020 at 22:39)</a>:</h4>
<p>which is basically recompiling the whole compiler</p>



<a name="187039124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039124">(Jan 30 2020 at 22:39)</a>:</h4>
<p>regarding <code>error_id!</code>.. we already have <code>error_code!</code> in <code>rustc_errors</code>... what's the difference beyond <code>code</code> -&gt; <code>id</code> ?</p>



<a name="187039136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039136">(Jan 30 2020 at 22:39)</a>:</h4>
<p>er, yeah, error_code would be the macro used I guess</p>



<a name="187039208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039208">(Jan 30 2020 at 22:40)</a>:</h4>
<p>(as a side note, I just did goto definition on a proc macro and it <em>worked</em> with RLA and I am speechless)</p>



<a name="187039245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039245">(Jan 30 2020 at 22:41)</a>:</h4>
<p>regardless, I think the issue of recompiling everything when adding a new symbol are not too interesting, i.e, we can make it work (there's no actual reason all symbols need to be in the same place, for example)</p>



<a name="187039254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039254">(Jan 30 2020 at 22:41)</a>:</h4>
<p>just the macro today requires that</p>



<a name="187039264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039264">(Jan 30 2020 at 22:41)</a>:</h4>
<p><span class="user-mention" data-user-id="116466">@Zoxc</span> ^---</p>



<a name="187039281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039281">(Jan 30 2020 at 22:42)</a>:</h4>
<p>but I think that should be fixed first though</p>



<a name="187039325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039325">(Jan 30 2020 at 22:42)</a>:</h4>
<p>but it could be pretty easily written I think to not need that, we'd need some constants that we update (offsets, basically); but it would only need to be updated every so often - we could give ourselves some "margin" so to speak</p>



<a name="187039326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039326">(Jan 30 2020 at 22:42)</a>:</h4>
<p>we shouldn't regress dev UX in the interim</p>



<a name="187039348"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039348" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039348">(Jan 30 2020 at 22:42)</a>:</h4>
<p>my understanding is that we add error codes like very rarely</p>



<a name="187039373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039373">(Jan 30 2020 at 22:43)</a>:</h4>
<p>I mostly don't add error codes cause I just avoid error codes</p>



<a name="187039378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039378">(Jan 30 2020 at 22:43)</a>:</h4>
<p>but I fairly frequently do add new errors</p>



<a name="187039389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039389">(Jan 30 2020 at 22:43)</a>:</h4>
<p>in any case, if we truly want to prevent typos, the way to do it is a global list</p>



<a name="187039409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039409">(Jan 30 2020 at 22:43)</a>:</h4>
<p>(and compiler or tidy-checking afterwards)</p>



<a name="187039512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039512">(Jan 30 2020 at 22:45)</a>:</h4>
<p>I think my idealized version would be something like this:</p>
<ul>
<li>We have <code>category::error_name</code> based errors. You do not have to register these codes in e.g. a crate that <code>rustc_parser</code> depends upon. For example: <code>syntax::missing_comma</code></li>
<li>We relate error codes to descriptions dynamically (with files that are loaded at runtime) such that error descriptions can be translated.</li>
</ul>



<a name="187039561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039561">(Jan 30 2020 at 22:46)</a>:</h4>
<p>That is, descriptions would not be part of the <code>rustc</code> program</p>



<a name="187039627"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039627" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039627">(Jan 30 2020 at 22:47)</a>:</h4>
<p>I don't personally see cause for the latter (it can be in a crate that is a dependency of say, rustc_driver or even <code>rustc</code> the binary crate).</p>
<p>The first, though, seems to match what I'm thinking with symbols</p>



<a name="187039649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039649">(Jan 30 2020 at 22:47)</a>:</h4>
<p>Although it is worth noting that an advantage of error codes is that they are short, which makes them stick out less in typical error messages, whereas <code>syntax::missing_comma</code> is not short.</p>



<a name="187039669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039669">(Jan 30 2020 at 22:47)</a>:</h4>
<p>I think that's in practice something we could fix separately</p>



<a name="187039715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039715">(Jan 30 2020 at 22:48)</a>:</h4>
<p>e.g. Cargo could learn to not show error codes</p>



<a name="187039724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039724">(Jan 30 2020 at 22:48)</a>:</h4>
<p>(well, Cargo could learn to tell rustc to not show error codes)</p>



<a name="187039734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039734">(Jan 30 2020 at 22:48)</a>:</h4>
<p>I still feel like for 99% of errors they're not useful</p>



<a name="187039749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039749">(Jan 30 2020 at 22:48)</a>:</h4>
<p>(e.g., I have no idea how we can elaborate on missing comma :)</p>



<a name="187039766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039766">(Jan 30 2020 at 22:49)</a>:</h4>
<p>fwiw, missing comma is a fairly simple error</p>



<a name="187039775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039775">(Jan 30 2020 at 22:49)</a>:</h4>
<p>there are much more complicated ones in terms of understanding</p>



<a name="187039787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039787">(Jan 30 2020 at 22:49)</a>:</h4>
<p>(looking at you, async-await errors...)</p>



<a name="187039806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039806">(Jan 30 2020 at 22:49)</a>:</h4>
<p>sure, yes</p>



<a name="187039907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039907">(Jan 30 2020 at 22:50)</a>:</h4>
<blockquote>
<p>I don't personally see cause for the latter (it can be in a crate that is a dependency of say, rustc_driver or even rustc the binary crate).</p>
</blockquote>
<p>That's the current state; <code>rustc_error_codes</code> is only a dep of <code>rustc_driver</code></p>



<a name="187039923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039923">(Jan 30 2020 at 22:51)</a>:</h4>
<p>But moving them to dynamically loaded "text files" would be even later "linking"</p>



<a name="187039928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039928">(Jan 30 2020 at 22:51)</a>:</h4>
<p>My point is that in most cases we don't need an error code (so adding it can be costly from compiletime perspective) and when we do, it can be long, because you're (more) likely to look at it.</p>



<a name="187039934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039934">(Jan 30 2020 at 22:51)</a>:</h4>
<p>such that you can swap out descriptions at runtime</p>



<a name="187039964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187039964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187039964">(Jan 30 2020 at 22:52)</a>:</h4>
<p>I am against text files that we load at runtime in rustc, though not the idea in general. If we do that, we might as well just not include them in rustc and have a error code index (HTML/Markdown) like we do today, nixing <code>rustc --explain</code>.</p>



<a name="187040004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040004">(Jan 30 2020 at 22:52)</a>:</h4>
<p>Haven't we been hearing that error codes are commonly useful?</p>



<a name="187040026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040026">(Jan 30 2020 at 22:52)</a>:</h4>
<p>We have heard that error codes are useful, yes, but that's not the assertion I'm making</p>



<a name="187040054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040054">(Jan 30 2020 at 22:52)</a>:</h4>
<p>I don't understand the difference in the distinction</p>



<a name="187040073"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040073" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040073">(Jan 30 2020 at 22:53)</a>:</h4>
<p>I'm saying <em>most</em> errors probably don't benefit from one. Those that do, are harder to fix -- i.e., you need to look at the error for a bit -- so having eye travel across a longer error code isn't a problem.</p>



<a name="187040101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040101">(Jan 30 2020 at 22:53)</a>:</h4>
<p>Hmm; I don't feel confident in making a statistical judgement like that</p>



<a name="187040125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040125">(Jan 30 2020 at 22:53)</a>:</h4>
<p>Remember, we are biased "language experts"</p>



<a name="187040238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040238">(Jan 30 2020 at 22:55)</a>:</h4>
<p>hm, I don't really see that being related, in the sense that all I'm saying is that <code>error[a very long code that is quite long]: foo</code> isn't great, yes</p>



<a name="187040252"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040252" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040252">(Jan 30 2020 at 22:55)</a>:</h4>
<p>but it's also true that such errors are ones you look at for a while anyway</p>



<a name="187040280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040280">(Jan 30 2020 at 22:55)</a>:</h4>
<p>but okay, let's presume I'm wrong</p>



<a name="187040363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040363">(Jan 30 2020 at 22:56)</a>:</h4>
<blockquote>
<p>I am against text files that we load at runtime in rustc, though not the idea in general. If we do that, we might as well just not include them in rustc and have a error code index (HTML/Markdown) like we do today, nixing rustc --explain.</p>
</blockquote>
<p>Can you elaborate on why? It seems to me that error descriptions are only ever needed when there's an error, which is a slow path, so perf shouldn't be an issue. Also, what's the plan for internationalization otherwise (maybe there isn't one?)</p>



<a name="187040446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040446">(Jan 30 2020 at 22:57)</a>:</h4>
<p>Seems we both agree that we need to keep error code length under wraps or they start losing their value <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="187040507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040507">(Jan 30 2020 at 22:58)</a>:</h4>
<p>There is no known plan for internationalization, to my knowledge. I think using it as an argument is odd, it's too far out, and there's no known plan.</p>
<p>It's not about slowness. It's about the fact that "many files on disk" fits poorly with (for example) distros</p>



<a name="187040509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040509">(Jan 30 2020 at 22:58)</a>:</h4>
<p>Finding a naming scheme that achieves that is a tough nut though</p>



<a name="187040571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040571">(Jan 30 2020 at 22:59)</a>:</h4>
<p>I would be interested in hearing from <span class="user-mention" data-user-id="132040">@Manish Goregaokar</span>  re. descriptions and translation</p>



<a name="187040585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040585">(Jan 30 2020 at 22:59)</a>:</h4>
<p>What if we move the error code to a note?</p>



<a name="187040594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040594">(Jan 30 2020 at 22:59)</a>:</h4>
<p>then it can be a link, even</p>



<a name="187040616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040616">(Jan 30 2020 at 22:59)</a>:</h4>
<p>or at least length is no longer an issue</p>



<a name="187040673"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040673" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040673">(Jan 30 2020 at 23:00)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> hmm, can you try a sample error from today and adjust it?</p>



<a name="187040679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040679">(Jan 30 2020 at 23:00)</a>:</h4>
<p>I'm confused</p>



<a name="187040687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040687">(Jan 30 2020 at 23:00)</a>:</h4>
<p>you mean like paste an example of how it looks?</p>



<a name="187040693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040693">(Jan 30 2020 at 23:00)</a>:</h4>
<p>and how you would change it with your "move to a note"</p>



<a name="187040858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040858">(Jan 30 2020 at 23:02)</a>:</h4>
<div class="codehilite"><pre><span></span>error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
 --&gt; src/main.rs:4:13
  |
3 |     let a = &amp;mut x;
  |             ------ mutable borrow occurs here
4 |     let b = &amp;x;
  |             ^^ immutable borrow occurs here
5 |     *a = 3;
  |     ------ mutable borrow later used here
</pre></div>


<div class="codehilite"><pre><span></span>error[borrow_check::double_mutable]: cannot borrow `x` as immutable because it is also borrowed as mutable
 --&gt; src/main.rs:4:13
  |
3 |     let a = &amp;mut x;
  |             ------ mutable borrow occurs here
4 |     let b = &amp;x;
  |             ^^ immutable borrow occurs here
5 |     *a = 3;
  |     ------ mutable borrow later used here
</pre></div>


<div class="codehilite"><pre><span></span>error: cannot borrow `x` as immutable because it is also borrowed as mutable
 --&gt; src/main.rs:4:13
  |
3 |     let a = &amp;mut x;
  |             ------ mutable borrow occurs here
4 |     let b = &amp;x;
  |             ^^ immutable borrow occurs here
5 |     *a = 3;
  |     ------ mutable borrow later used here

    help: longer explanation can be viewed via `rustc --explain borrow_check::double_mutable`
</pre></div>



<a name="187040984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040984">(Jan 30 2020 at 23:04)</a>:</h4>
<p><code>error[borrow_check::double_mutable]:</code> could probably be <code>error[borrow::double_mut]:</code></p>



<a name="187040991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187040991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187040991">(Jan 30 2020 at 23:04)</a>:</h4>
<p>last one looks good though</p>



<a name="187041082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187041082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187041082">(Jan 30 2020 at 23:05)</a>:</h4>
<div class="codehilite"><pre><span></span>    help: use `rustc --explain borrow_check::double_mutable` for a longer explanation
    help: longer explanation can be viewed via `rustc --explain borrow_check::double_mutable`
</pre></div>



<a name="187041105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187041105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187041105">(Jan 30 2020 at 23:05)</a>:</h4>
<p>yeah, the last one is my option for 'here is how we avoid all problems with length' basically</p>



<a name="187041157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187041157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187041157">(Jan 30 2020 at 23:06)</a>:</h4>
<p>(and get the advantage that it's easier to drop/edit/etc, in theory)</p>



<a name="187041181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187041181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187041181">(Jan 30 2020 at 23:06)</a>:</h4>
<p>too bad we can't hyperlink terminal texts lol</p>



<a name="187041190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187041190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187041190">(Jan 30 2020 at 23:06)</a>:</h4>
<p>such an outdated medium :D</p>



<a name="187041234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187041234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187041234">(Jan 30 2020 at 23:07)</a>:</h4>
<p>hm, well, we can, I think</p>



<a name="187041239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187041239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187041239">(Jan 30 2020 at 23:07)</a>:</h4>
<p>or at least on some platforms</p>



<a name="187041249"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187041249" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187041249">(Jan 30 2020 at 23:07)</a>:</h4>
<p>but rustc should probably not be doing that</p>



<a name="187041367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187041367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187041367">(Jan 30 2020 at 23:09)</a>:</h4>
<p>So I like your third snippet; I think that's what we should do</p>



<a name="187041561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187041561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187041561">(Jan 30 2020 at 23:12)</a>:</h4>
<p><span aria-label="thumbs up" class="emoji emoji-1f44d" role="img" title="thumbs up">:thumbs_up:</span> from me fwiw</p>



<a name="187041592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187041592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187041592">(Jan 30 2020 at 23:13)</a>:</h4>
<p>that seems like a move we can do fairly independently</p>



<a name="187041635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187041635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187041635">(Jan 30 2020 at 23:13)</a>:</h4>
<p>though it will need:</p>
<ol>
<li>adjustements to tests so that they don't mention error codes</li>
<li>p=100 to avoid bitrot :D</li>
</ol>



<a name="187041653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187041653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187041653">(Jan 30 2020 at 23:13)</a>:</h4>
<p>we can do 1. first and separately</p>



<a name="187050631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187050631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187050631">(Jan 31 2020 at 01:49)</a>:</h4>
<p>When the code is constant-length its easy to skim past it when its not relevant to you</p>



<a name="187050649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187050649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187050649">(Jan 31 2020 at 01:50)</a>:</h4>
<p>long names will invariably be… variable</p>



<a name="187901869"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/187901869" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#187901869">(Feb 11 2020 at 10:59)</a>:</h4>
<p>So if I understood correctly, we'll go for string representation as an intermediate step. Then I'll finish my PR.</p>



<a name="188656014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/188656014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Vossen <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#188656014">(Feb 20 2020 at 17:00)</a>:</h4>
<p>So I just decided to try to take up this PR, should I hold off on working on it until this change is made (or decided to be not made)? <a href="https://github.com/rust-lang/rust/issues/44710#issuecomment-588453311" target="_blank" title="https://github.com/rust-lang/rust/issues/44710#issuecomment-588453311">https://github.com/rust-lang/rust/issues/44710#issuecomment-588453311</a></p>



<a name="188656091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/188656091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Vossen <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#188656091">(Feb 20 2020 at 17:00)</a>:</h4>
<p>I would also be willing to help with the transition if you need it</p>



<a name="188676831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/188676831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#188676831">(Feb 20 2020 at 20:56)</a>:</h4>
<p>I think we're not yet ready to move of numeric error codes</p>



<a name="188676859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/188676859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#188676859">(Feb 20 2020 at 20:56)</a>:</h4>
<p>My comment is totally outdated now too...</p>



<a name="188690665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/get%20rid%20of%20error%20codes/near/188690665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Vossen <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/get.20rid.20of.20error.20codes.html#188690665">(Feb 20 2020 at 23:36)</a>:</h4>
<p>Alright, I will go ahead with work on that issue then</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>